import request from '@/utils/request'

// 查询led屏列表
export function listLed(query) {
  return request({
    url: '/lgdz/led/selectLed',
    method: 'get',
    params: query
  })
}
//开关
export function uploadKai(data) {
  return request({
    url: '/lgdz/led/updateLedStatus',
    method: 'post',
    data:data
  })
}
// 查询led屏详细
export function getLed(id) {
  return request({
    url: '/lgdz/led/selectLed?id=' + id,
    method: 'get'
  })
}

// 下发led屏
export function insertLedandSubLed(data) {
  return request({
    url: '/lgdz/led/insertLedandSub',
    method: 'post',
    data: data
  })
}
// 下发led屏
// export function insertLedadd(data) {
//   return request({
//     url: '/lgdz/led/IssueLed',
//     method: 'post',
//     headers: {
//       "Content-Type": "application/json"
//     },
//     data: data
//   })
// }

// 新增led屏
export function addLed(data) {
  return request({
    url: '/lgdz/led/insertLedandSub',
    method: 'post',
    data: data
  })
}

// 修改led屏
export function updateLed(data) {
  return request({
    url: '/lgdz/led/updateledandSub',
    method: 'post',
    data: data
  })
}

// 删除led屏
export function delLed(id) {
  return request({
    url: '/lgdz/led/deleteLed?id='+id,
    method: 'get',
  })
}



// 导出led屏
export function exportLed(query) {
  return request({
    url: '/lgdz/led/export',
    method: 'get',
    params: query
  })
}
